<extend name="Public/base"/>

<block name="body">
<div class="main-title">
        <h2>咨询列表 </h2>
    </div>
    <if condition="IS_ROOT">
        <div class="cf">
           
          
            <div class="span4 toolbar-text-right search-form">
                <div class="input-append"></div>
            </div>
        </div>
    </if>

    <div class="data-table table-striped">
        <form class="ids">
            <table>
                <thead>
                    <tr>
                        <th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
                        <th class="">编号</th>
                        <th class="">标题</th>
                      
                    
                        <th class="">邮箱</th>
                        <th class="">电话</th>
                        <th class="">详情</th>
                        <th class="">时间</th>
                        <th class="">操作</th>
                    </tr>
                </thead>
                <tbody>
                <notempty name="_list">
                    <volist name="_list" id="vo">
                    <tr>
                        <td><input class="ids" type="checkbox" name="ids[]" value="{$vo.id}" /></td>
                        <td>{$vo.id} </td>
                        <td>{$vo.biaoti}</td>
                       
                        
                        <td>{$vo.youxiang}</td>
                        <td>{$vo.dianhua}</td>
                        <td>{$vo.xiangqing}</td>
                        <td><span>{$vo.create_time|time_format}</span></td>
                        <td>
                          
                            <!--  <if condition="($mode eq 1) && IS_ROOT">
                                <a href="{:U('Poster/call?id='.$vo['id'])}" {$modal} class="da-tooltip-w" title="调用代码">调用代码</a>
                                <a href="{:U('Poster/edit?id='.$vo['id'])}" {$modal} class="da-tooltip-w" title="编辑">编辑</a>
                                <a href="{:U('Poster/del?ids='.$vo['id'])}" class="ajax-get da-tooltip-w" title="删除">删除</a>
                            </if> -->
                             <a href="{:U('Gust/del?ids='.$vo['id'])}" class="ajax-get da-tooltip-w" title="删除">删除</a>
                        </td>
                    </tr>
                    </volist>
                    <else/>
                    <td colspan="8" class="text-center"> aOh! 暂时还没有内容! </td>
                    </notempty>
                </tbody>
            </table>
        </form>
        <!-- 分页 -->
        <div class="page">

        </div>
    </div>
</block>

<block name="script">
    <script type="text/javascript">
        $(function() {
            //搜索功能
            $("#search").click(function() {
                var url = $(this).attr('url');
                var query = $('.search-form').find('input').serialize();
                query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
                query = query.replace(/^&/g, '');
                if (url.indexOf('?') > 0) {
                    url += '&' + query;
                } else {
                    url += '?' + query;
                }
                window.location.href = url;
            });
            //回车搜索
            $(".search-input").keyup(function(e) {
                if (e.keyCode === 13) {
                    $("#search").click();
                    return false;
                }
            });
            //导航高亮
            highlight_subnav('{:U('index')}');
            //点击排序
            $('.list_sort').click(function(){
                var url = $(this).attr('url');
                var ids = $('.ids:checked');
                var param = '';
                if(ids.length > 0){
                    var str = new Array();
                    ids.each(function(){
                        str.push($(this).val());
                    });
                    param = str.join(',');
                }

                if(url != undefined && url != ''){
                    window.location.href = url + '/ids/' + param;
                }
            });
        });
    </script>
</block>